﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using System.ComponentModel;
using IndoReputation.Commons;

namespace IndoReputation.Views.ViewModels
{
    public class MediaCategoryViewModel
    {
        [Required]
        public int ID
        {
            set;
            get;
        }

        [Required(ErrorMessage = "Please type the Name")]
        [StringLength(256, ErrorMessage = "String may not be longer than 256 characters")]
        [PlaceHolder("Enter name here")]
        public string Name
        {
            set;
            get;
        }

        private bool _IsOnline = true;
        [Required]
        [Display(Name = "Is Online ?")]
        public bool IsOnline
        {
            set { _IsOnline = value; }
            get { return _IsOnline; }
        }

        [DataType(DataType.MultilineText)]
        [StringLength(512, ErrorMessage = "String may not be longer than 512 characters")]
        [PlaceHolder("Enter description here")]
        public string Description
        {
            set;
            get;
        }
        public DateTime? CreateAt
        {
            set;
            get;
        }
        public int? CreateBy
        {
            set;
            get;
        }

        public IEnumerable<SelectListItem> MediaCategoryListSection { get; set; }
        [Required(ErrorMessage = "You must select an option for Media Category Section")]
        [Display(Name = "Choose Section")]
        public String MediaCategorySectionString { get; set; }
    }

    public enum MediaCategorySection : int
    {
        [Description("Newspaper, Magazine, Journals")]
        Newspaper = 1,
        [Description("Television")]
        Television = 2,
        [Description("Radio")]
        Radio = 3,
        [Description("Online News")]
        OnlineNews = 4
    }
}